﻿/// <reference name="MicrosoftAjax.js"/>

Type.registerNamespace("YUIAspNet");

YUIAspNet.Logger = function(element) {
    YUIAspNet.Logger.initializeBase(this, [element]);
}

YUIAspNet.Logger.prototype = {
    initialize: function() {
        YUIAspNet.Logger.callBaseMethod(this, 'initialize');
    },

    initializeYUIControl: function(sender, args) {
        var options = {
            bottom: this.get_Bottom(),
            draggable: this.get_Draggable(),
            footerEnabled: this.get_FooterEnabled(),
            height: this.get_Height(),
            isCollapsed: this.get_IsCollapsed(),
            isPaused: this.get_IsPaused(),
            left: this.get_Left(),
            newestOnTop: this.get_NewestOnTop(),
            right: this.get_Right(),
            thresholdMax: this.get_MaxDisplayMessageCount(),
            thresholdMin: this.get_MinDisplayMessageCount(),
            top: this.get_Top(),
            verboseOutput: this.get_Verbose(),
            width: this.get_Width()
        };

        this._yuiControl = new YAHOO.widget.LogReader(this.get_LogContainer(), options);

        //myFooterDisabled.setTitle("Footer Disabled");
    },
    
    log: function(message, level, source){
        YAHOO.log(message, level, source);
    },

    get_LogContainer: function() {
        return this._logContainer;
    },
    set_LogContainer: function(logContainer) {
        this._logContainer = logContainer;
    },

    get_Width: function() {
        return this._width;
    },
    set_Width: function(width) {
        this._width = width;
    },

    get_Height: function() {
        return this._height;
    },
    set_Height: function(height) {
        this._height = height;
    },

    get_Top: function() {
        return this._top;
    },
    set_Top: function(top) {
        this._top = top;
    },

    get_Left: function() {
        return this._left;
    },
    set_Left: function(left) {
        this._left = left;
    },

    get_Right: function() {
        return this._right;
    },
    set_Right: function(right) {
        this._right = right;
    },

    get_Bottom: function() {
        return this._bottom;
    },
    set_Bottom: function(bottom) {
        this._bottom = bottom;
    },

    get_Draggable: function() {
        return this._draggable;
    },
    set_Draggable: function(draggable) {
        this._draggable = draggable;
    },

    get_FooterEnabled: function() {
        return this._footerEnabled;
    },
    set_FooterEnabled: function(footerEnabled) {
        this._footerEnabled = footerEnabled;
    },

    get_IsCollapsed: function() {
        return this._isCollapsed;
    },
    set_IsCollapsed: function(isCollapsed) {
        this._isCollapsed = isCollapsed;
    },

    get_IsPaused: function() {
        return this._isPaused;
    },
    set_IsPaused: function(isPaused) {
        this._isPaused = isPaused;
    },

    get_NewestOnTop: function() {
        return this._newestOnTop;
    },
    set_NewestOnTop: function(newestOnTop) {
        this._newestOnTop = newestOnTop;
    },

    get_MaxDisplayMessageCount: function() {
        return this._maxDisplayMessageCount;
    },
    set_MaxDisplayMessageCount: function(maxDisplayMessageCount) {
        this._maxDisplayMessageCount = maxDisplayMessageCount;
    },

    get_MinDisplayMessageCount: function() {
        return this._minDisplayMessageCount;
    },
    set_MinDisplayMessageCount: function(minDisplayMessageCount) {
        this._minDisplayMessageCount = minDisplayMessageCount;
    },

    get_Verbose: function() {
        return this._verbose;
    },
    set_Verbose: function(verbose) {
        this._verbose = verbose;
    }
}

YUIAspNet.Logger.registerClass('YUIAspNet.Logger', YUIAspNet.BaseControl);
